package com.minimalist.common.entity.basic.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author 11987
 */
@Schema(name = "用户重置密码实体")
public class RePasswordVO implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "旧密码不能为空")
    @Schema(name = "oldPassword", description = "旧密码", type = "string")
    private String oldPassword;

    public String getOldPassword() {
        return oldPassword;
    }

    public void setOldPassword(String oldPassword) {
        this.oldPassword = oldPassword;
    }

    @NotBlank(message = "新密码不能为空")
    @Schema(name = "newPassword", description = "新密码", type = "string")
    private String newPassword;

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RePasswordVO that = (RePasswordVO) o;
        return Objects.equals(oldPassword, that.oldPassword) &&
               Objects.equals(newPassword, that.newPassword);
    }

    @Override
    public int hashCode() {
        return Objects.hash(oldPassword, newPassword);
    }

    @Override
    public String toString() {
        return "RePasswordVO{" +
               "oldPassword='" + oldPassword + '\'' +
               ", newPassword='" + newPassword + '\'' +
               '}';
    }
}
